using UnityEngine;

namespace Assets.Scripts.Controllers
{
    internal class EffectsController : BaseController<EffectsController>
    {
        [SerializeField] private ParticleSystem _childsImpactEffect;
        [SerializeField] private ParticleSystem _happyEffect;
        [SerializeField] private ParticleSystem _unhappyEffect;
        [SerializeField] private ParticleSystem _payEffect;

        public void SpawnChildImpactEffect(Vector3 pos)
        {
            pos.z = -7f;
            _childsImpactEffect.transform.position = pos;
            _childsImpactEffect.Play();
        }

        public void SpawnHappyEffect(Vector3 pos)
        {
            pos.z = -7f;
            _happyEffect.transform.position = pos;
            _happyEffect.Play();
        }

        public void SpawnUnhappyEffect(Vector3 pos)
        {
            pos.z = -8f;
            _unhappyEffect.transform.position = pos;
            _unhappyEffect.Play();
        }

        public void SpawnPayEffect(Vector3 pos)
        {
            pos.z = -7; // to show effect above all
            _payEffect.transform.position = pos;
            _payEffect.Play();
        }
    }
}
